#import "~/graphql_shared/fragments/page_info.fragment.graphql"
#import "./iteration_list_item.fragment.graphql"

query Iterations(
  $fullPath: ID!
  $iterationCadenceId: IterationsCadenceID!
  $state: IterationState!
  $sort: IterationSort
  $beforeCursor: String
  $afterCursor: String
  $firstPageSize: Int
  $lastPageSize: Int
) {
  workspace: project(fullPath: $fullPath) {
    id
    iterations(
      iterationCadenceIds: [$iterationCadenceId]
      state: $state
      sort: $sort
      before: $beforeCursor
      after: $afterCursor
      first: $firstPageSize
      last: $lastPageSize
    ) {
      nodes {
        ...IterationListItem
      }
      pageInfo {
        ...PageInfo
      }
    }
  }
}
